﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WJP.ComponentModel;

namespace WJP.Dependency.Installers
{
    public class CoreInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            if (!container.Kernel.HasComponent(typeof(IPluginManager)))
            {
                container.Register(
                Component.For<IPluginManager, PluginManager>().ImplementedBy<PluginManager>().LifestyleSingleton()
                );
            }
        }
    }
}
